Manjaro 安装配置

停用 watchdog

关机时提示:watchdog: watchdog0: watchdog did not stop! 在台式机和笔记本上安装 Manjaro 时可以停用 watchdog 模块
Improving performance#Watchdogs

Many users need this feature due to their system’s mission-critical role (i.e. servers), or because of the lack of power reset (i.e. embedded devices). Thus, this feature is required for a good operation in some situations. On the other hand, normal users (i.e. desktop and laptop) do not need this feature and can disable it.

按照 archlinux wiki 上的方法,在启动参数中添加 nowatchdog 不能停用 watchdog

Note: Some users reported the nowatchdog parameter does not work as expected but they have successfully disabled the watchdog (at least the hardware one) by blacklisting the above-mentioned module.

另一种方法是在内核启动参数中添加 modprobe.blacklist=iTCO_wdt 来禁用 watchdog 模块。
编辑 /etc/default/grubGRUB_CMDLINE_LINUX_DEFAULT 后添加 modprobe.blacklist=iTCO_wdt 保存退出后执行 sudo update-grub 来应用配置。

Edit /etc/default/grub and append modprobe.blacklist=iTCO_wdt to the GRUB_CMDLINE_LINUX_DEFAULT line

Kernel parameter#GRUB
Silent shutdown. watchdog: watchdog0: watchdog did not stop!

imwheel

ManjaroUbuntu 的鼠标滚轮滚动速度太慢,可以使用 imwheel 修改滚动速度。
AUR 中搜索 imwheel 并安装,新建 imwheel 配置文件 vim ~/.imwheelrc,添加以下配置,执行 imwheel 启动程序

1
2
3
4
5
6
7
8
9
".*"
None, Up, Button4, 3
None, Down, Button5, 3
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
None, Thumb1, Alt_L|Left
None, Thumb2, Alt_L|Right

Speeding up the mouse wheel in Ubuntu 18.04
Ubuntu imwheel使用鼠标侧键
linux下的鼠标滚动设定

自动启动,使用 gnome-session-properties 来自启动应用

AUR 中搜索安装 gnome-session-propertiesAlt + F2 输入 gnome-session-properties 进入管理界面

deprecated
新建 autostarting.service 文件 vim /usr/lib/systemd/system/autostarting.service,内容为:

1
2
3
4
5
6
7
8
9
[Unit]
Description="autostarting service"

[Service]
Type=forking
ExecStart=/etc/autostarting.sh

[Install]
WantedBy=multi-user.target

启用服务 systemctl enable autostarting.service,可以通过 systemctl status autostarting.service 查看该服务运行状态
新建 /etc/autostarting.sh 文件 vim /etc/autostarting.sh,该文件的内容为需要开机时自动运行的程序

1
2
3
#!/bin/sh
imwheel # 自动启动 imwheel
exit 0

添加可执行权限 chmod +x /etc/autostarting.sh
Archlinux systemd 开机执行rc.local
Systemd#Writing unit files

双系统时间问题,让 Manjaro 不使用UTC时间,从而与 Windows 保持一致

sudo timedatectl set-local-rtc 1
Ubuntu 16.04 win7 双系统时间问题(网友解决方案小汇总)

安装 fcitx

安装 fctix 组件 sudo pacman -S fcitx fcitx-libpinyin fcitx-configtool fcitx-im,新建 ~/.xprofile 文件添加以下内容
添加 export LC_CTYPE="zh_CN.UTF-8" 使 emacs 能使用中文输入法

1
2
3
4
export LC_CTYPE="zh_CN.UTF-8"
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

在Emacs中启用Fcitx输入法
Emacs GUI下不能输入中文

修改 gnome3 登录界面背景

新建文件 login-background.sh 添加以下内容,执行 IMAGE=~/pic.jpg sh login-background.sh 来修改背景

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
WORKDIR=~/tmp/gdm-login-background
GST=/usr/share/gnome-shell/gnome-shell-theme.gresource
GSTRES=$(basename $GST)

mkdir -p $WORKDIR
cd $WORKDIR
mkdir theme

for r in `gresource list $GST`; do
gresource extract $GST $r >$WORKDIR$(echo $r | sed -e 's/^\/org\/gnome\/shell\//\//g')
done

cd theme
cp "$IMAGE" ./

echo "
#lockDialogGroup {
background: #2e3436 url(resource:///org/gnome/shell/theme/$(basename $IMAGE));
background-size: cover;
background-repeat: no-repeat;
}" >>gnome-shell.css

echo '<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/shell/theme">' >"${GSTRES}.xml"
for r in `ls *.*`; do
echo " <file>$r</file>" >>"${GSTRES}.xml"
done
echo ' </gresource>
</gresources>' >>"${GSTRES}.xml"

glib-compile-resources "${GSTRES}.xml"

sudo mv "/usr/share/gnome-shell/$GSTRES" "/usr/share/gnome-shell/${GSTRES}.backup"
sudo mv "$GSTRES" /usr/share/gnome-shell/

rm -r $WORKDIR

if [ "$CREATED_TMP" = "1" ]; then
rm -r ~/tmp
fi

How to customize Gnome login screen in Debian

隐藏 gnome3 顶栏

安装 Hide Top Bar 扩展
https://extensions.gnome.org/extension/545/hide-top-bar/

emacs

https://alpha.gnu.org/gnu/emacs/pretest/windows/emacs-27/ 下载 emacs 源代码,解压到 emacs 目录

1
2
3
4
cd emacs
./configure --with-x-toolkit=lucid
sudo make && sudo make install
# sudo make uninstall

redshift

新建配置文件 vim ~/.config/redshift.conf 添加以下配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[redshift]
; 白天屏幕温度
temp-day=5000
; 夜晚屏幕温度
temp-night=4100
; 昼夜是否平滑过度(1/0)
transition=1

; 位置提供方式(redshift -l list)
location-provider=manual

[manual]
; 位置提供方式设置
; 经纬度(北京)
lat=39.90
lon=116.41

ubuntu下 保护眼睛的RedShift

disable Night-light in GDM screen

Night-light feature is enabled also in GDM screen, see here : https://bugzilla.gnome.org/show_bug.cgi?id=785273 for more info.
If you want to disable it please type this command:

1
sudo -u gdm dbus-launch --exit-with-session gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled false